<?php

namespace app\pay\controller;

use app\common\exception\BusinessException;
use think\facade\Cache;
use think\facade\Config;
use v8_pay\AlipayNotify;
use v8_pay\AlipaySubmit;

class Jump extends Base
{

    /**
     * 跳转支付
     * @throws BusinessException
     */
    public function index()
    {
        // 请求参数
        $id = $this->request->param('id', '');
        if (!$id) {
            throw new BusinessException('请求参数不得为空');
        }
        // 读取缓存数据
        $content = Cache::get($id);
        if (!$content) {
            throw new BusinessException('系统读取错误,请反馈管理员');
        }
        echo $content;
    }
}
